//
//  YJJAdSDK.h
//  YJJAdSDK
//
//  Created by 陈坤 on 2025/8/22.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface YJJAdSDK : NSObject

/**
使用域名 http://ad.yjjwlkj.com 初始化SDK

@param appId 唯一appid
@param completion 初始化完成回调
*/
+ (void)initWithAppId:(NSString *)appId completionBlock:(nullable void(^)(NSError *_Nullable error))completion;

/**
初始化SDK

@param appId 唯一appid
@param requestURL 初始化请求地址，格式为协议加域名
@param completion 初始化完成回调
*/
+ (void)initWithAppId:(NSString *)appId requestURL:(NSString *)requestURL completionBlock:(nullable void(^)(NSError *_Nullable error))completion;

/**
 SDK Version
 */
+ (NSString *)getVersion;

/**
 SDK init succeed or not
 
 @param appId 给定的唯一appid
 */
+ (BOOL)initSucceed:(NSString *)appId;

/**
 设置WebView的原始UA
 原始UA示例：Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
 原始UA应满足正则表达式‘^Mozilla.*?Mobile\/[0-9A-Z]+’
 @param UA WebView的原始UA
 */
+ (NSError *)setUA:(NSString *)UA;

@end

NS_ASSUME_NONNULL_END
